package cz.boxdesign.library.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cz.boxdesign.library.common.dao.CommonObjectDao;
import cz.boxdesign.library.common.dao.DatabaseOperationException;
import cz.boxdesign.library.entity.User;

@Service("userService")
public class UserService extends CommonServiceAbstract<User> {

  @Autowired
  CommonObjectDao commonObjectDao;

  @Override
  public void initService() {
    setClass(User.class);
  }

  public boolean isAccountExpired(Integer id) throws DatabaseOperationException {
    return commonObjectDao.isAccountExpired(id);
  }
}
